// 监控登录方法
Interceptor.attach(ObjC.classes.SNLoginViewController["- loginWithUsername:password:completion:"].implementation, {
  onEnter: function(args) {
      var username = new ObjC.Object(args[2]).toString();
      var password = new ObjC.Object(args[3]).toString();
      console.log("[+] 登录尝试:");
      console.log("    用户名: " + username);
      console.log("    密码: " + password);
  }
});

// 监控网络请求
Interceptor.attach(ObjC.classes.NSURLSession["- dataTaskWithRequest:completionHandler:"].implementation, {
  onEnter: function(args) {
      var request = new ObjC.Object(args[2]);
      if (request.URL().absoluteString().toString().includes("login")) {
          console.log("[+] 登录请求:");
          console.log("    URL: " + request.URL().absoluteString());
          var body = request.HTTPBody();
          if (body) {
              console.log("    Body: " + new ObjC.Object(body).toString());
          }
      }
  }
});
